package org.cerberus.platform.share;

import java.io.IOException;

import org.cerberus.platform.internal.domain.IComponentClass;

public interface IPlatformOutputStream {

	void writePlatformID(Integer id);
	
	void writeNewClass(IComponentClass clazz)  throws IOException;
	
	/** [0]=classID
	 *  [1]=objectID
	 *  [2..]=data 
	 *   */
	void writeRemoveClass(String classID)  throws IOException;
	
	/** [0]=object id
	 *  [1]=classID
	 *  [2..]=data 
	 *   */
	void writeNewObject(Object[] object)  throws IOException;
	void writeRemoveObject(Integer id)  throws IOException;
	
	/** 
	 * [0]=objectID
	 * [1]=index
	 * [2]=value
	 * */
	void writeChange(Object[] change) throws IOException;
	
	void flush() throws IOException ;
}
